public ArrCode
public ArrXCode
public ArrRsn
public ArrXRsn

Sub window_onload

'********************************************************************
' On Windows Load Check If it is a Return From The Validation Site	*
' and If The New Fund Check Box was selected.						*
' Generate The Fund Type and Xfer Type listboxes if " TRUE"			*	
'********************************************************************

If frmFormC.new.value="True" and frmFormC.fund.value="no" then 
	
	frmFormC.chkNewFund.checked=true
	dim strLst
	
END iF


'****************************************************************************
'The "GET" Value shows that it is the first Time that the Form is loaded	*
'The Fund Type list Box are generated										*
'The Directive Reason's default value are set								*
'****************************************************************************

iF frmFormC.new.value="GET" then
	frmFormC.lstRFD.selectedIndex = 2
	clearall(frmFormC)
	If frmFormC.fund.value = "no" then
		ClearFund(frmFormC)
		'frmFormC.chkNewFund.focus
	end If
End If


'********************************************************************
' Check for any return value from Xfer Y/N selected Index Value		*
'********************************************************************
if frmFormC.YN.VALUE = "1" then
	If frmFormC.fund.value = "Yes" then
		GetXferRsn()
	Else 
		
	End If
	frmFormC.txtfn.disabled = false
	frmFormC.txtnf.disabled = false
	frmFormC.txtat.disabled = false
	frmFormC.XFERnUMBER.disabled = false
	frmFormC.lstFTTrans.disabled = false
	frmFormC.lstFTTrans.selectedIndex = frmFormC.XferTypeIn.VALUE
else
	frmFormC.txtfn.disabled = true
	frmFormC.txtnf.disabled = true
	frmFormC.txtat.disabled = true
	frmFormC.XFERnUMBER.disabled = true
	frmFormC.lstFTTrans.disabled = true
end If
End Sub   'END OF WINDOW ON LOAD EVENT


'****************************************************************
' Set the SelectedIndex  Variable for Directive Reason on change *
'****************************************************************

sub lstRFD_onchange
	frmFormC.dirRsnIndex.value = frmFormC.lstRFD.selectedIndex
end Sub

'****************************************************************
' Set the SelectedIndex  Variable for Xfer Type Select			 *
'****************************************************************

SUB lstFTTrans_onchange
	frmFormC.XferTypeIn.value = frmFormC.lstFTTRans.selectedIndex
	
	if frmFormC.xferNumber.value <> "" then
		Call KeyTaxMessageBox ("Please note that you can enter either and existing fund number, or specify new transfer fund details." & vbcrlf & vbcrlf & "The existing transfer fund number that you have inserted, will therefore be cleared", "Input Error", "Exclamation")
		'Msgbox "Please note that you can enter either and existing fund number, or specify new transfer fund details." & vbcrlf & vbcrlf & "The existing transfer fund number that you have inserted, will therefore be cleared."
		frmFormC.xferNumber.value=""
	end if
	
end Sub

'*************************************************
' Set Xfer Drop down on return for existing Fund *
'*************************************************

function GetXferRsn()
		
END fUNCTION

'****************************************************
' On Submit Button set the Selected Index Varaibles	*
'****************************************************

Sub SubmitDirective_onclick
	frmFormC.XferTypeIn.value = frmFormC.lstFTTrans.selectedIndex
	frmFormC.DirRsnIndex.value = frmFormC.lstRFD.selectedIndex
End Sub

sub txtADFullDate_onfocus
	
end Sub

sub txtGLS_onfocus
	
end Sub

Sub OTC(FormName)
	
	If mid(FormName.txtOTC.value,1,1) <> "R" then
		If isnumeric(mid(FormName.txtOTC.value,1,1)) then
		FormName.txtOTC.value = "R" & FORMATNumber(FormName.txtOTC.value,2)
		ELSE
		FormName.txtOTC.value=""
		END iF
	end if
	
End Sub

SUB ClearAll(FormName)

	
end Sub

Sub ClearFund(FormName)
	
end Sub


Sub chkNewFundClick(FORMNAME)

	FORMNAME.NEW.VALUE=FORMNAME.chkNewFund.checked
	
	
End Sub

Sub NewFundChecked(FormName)
	
End Sub

Sub TRA(FormName)
	If mid(FormName.txtTRA.value,1,1) <> "R" then
		If isnumeric(mid(FormName.txtTRA.value,1,1)) then
			FormName.txtTRA.value = "R" & FORMATNumber(FormName.txtTRA.value,2)
		else
			FormName.txtTRA.value = ""
		END iF
	end if
End Sub

sub txtTRA_onfocus
	
end Sub

sub txtTPAS_onfocus
	
end Sub

sub txtOTC_onfocus
	
end Sub

sub txtPN_onfocus
	
end Sub

sub txtNF_onfocus
	
end Sub

sub txtFN_onfocus
	
end Sub

sub txtAT_onfocus
	
end Sub


sub xferNumber_onfocus
	
end Sub

sub txtFundName_onfocus
	
end Sub

sub txtCP_onfocus
	
end Sub

sub txtTelCode_onfocus
	
end Sub

sub txtTelNumber_onfocus
	
end Sub

sub txtPost1_onfocus
	
end Sub

sub txtPost2_onfocus
	
end Sub

sub txtPost3_onfocus
	
end Sub
sub txtPost4_onfocus
	
end Sub

sub txtPostCode_onfocus
	
end Sub